<?php
include  __DIR__.'/common/common.php';//添加
$uid=(int)($_POST['uid']);
$name=addslashes($_POST['name']);
$price=(int)($_POST['price']);
$lb=addslashes($_POST['lb']);
$classify=addslashes($_POST['classify']);
$brand=addslashes($_POST['brand']);
$inventory=(int)($_POST['inventory']);
$particulars=addslashes($_POST['particulars']);
$sql="UPDATE `baidu`.`goods` SET `name` = '$name',`price` = '$price',`lb` = '$lb',`classify` = '$classify',
`brand` = '$brand',
`inventory` = '$inventory',
`particulars` = '$particulars' WHERE `goods`.`uid` =$uid;";
$bool=mysqli_query($mysql,$sql);
if ($bool)
{
    echo json_encode(array(
        '0'=>'ok',
        'uid'=>$index
    ));
}else{
    echo 'no';
}